#ifndef __HELLOWORLD_SCENE_H__
#define __HELLOWORLD_SCENE_H__

#include "cocos2d.h"
#include "cocos-ext.h"
#include "CCParallaxNodeExtras.h"
#include "ParallaxList.h"


USING_NS_CC;
USING_NS_CC_EXT;

class HelloWorld : public cocos2d::CCLayer
{
private:

	float xBegan_temp;
	float xMoved_temp;
	// Check swipe event
	float initialTouchPos[2];
    float currentTouchPos[2];
	bool isTouchDown;

	CCNode* monkeyNode;

	CCSize visibleSize;

	ParallaxList *m_PList;


	int m_leftTree;
	int m_CurrentTree;
	int m_RightTree;

public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();  

    // there's no 'id' in cpp, so we recommend returning the class instance pointer
    static cocos2d::CCScene* scene();
    
    // a selector callback
    void menuCloseCallback(CCObject* pSender);

    virtual void onEnter();
    virtual void onExit();
	virtual bool ccTouchBegan(CCTouch* touch, CCEvent* event);
    virtual void ccTouchMoved(CCTouch* touch, CCEvent* event);
	virtual void ccTouchEnded(CCTouch* touch, CCEvent* event);
	virtual void update(float delta);

    // implement the "static node()" method manually
    CREATE_FUNC(HelloWorld);

	Monkey* m_Monkey;



	void fAddMonkey();

	
};

#endif // __HELLOWORLD_SCENE_H__
